package com.xuecheng.base.exception;

/**
 * @ClassName: 学成在线项目异常类
 * @Description:
 * @Author: Huang Yao
 * @CreateTime: 2024-06-23 22:33
 * @Version: 1.0
 **/
public class XueChengPlusException extends RuntimeException{
    private String errMessage;

    public XueChengPlusException() {
        super();
    }

    public XueChengPlusException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    /**
     * 获取
     * @return errMessage
     */
    public String getErrMessage() {
        return errMessage;
    }

    /**
     * 设置
     * @param errMessage
     */
    public void setErrMessage(String errMessage) {
        this.errMessage = errMessage;
    }
    public static void cast(CommonError commonError){
        throw new XueChengPlusException(commonError.getErrMessage());
    }
    public static void cast(String errMessage){
        throw new XueChengPlusException(errMessage);
    }
}
